package com.jacobson.huobi.common.config

import com.jacobson.core.di.components.AppComponent
import com.jacobson.core.framework.repository.IRepositoryManager
import com.jacobson.core.widget.security.authc.AuthenticationInfo
import com.jacobson.core.widget.security.authc.AuthenticationToken
import com.jacobson.core.widget.security.realm.AuthenticatingRealm
import com.jacobson.huobi.common.di.components.DaggerHuobiRealmComponents
import javax.inject.Inject

class HuobiRealm : AuthenticatingRealm() {
    @Inject
    lateinit var repositoryManager: IRepositoryManager

    override fun doGetAuthenticationInfo(token: AuthenticationToken): AuthenticationInfo? {
        return null
    }

    fun inject(appComponent: AppComponent) {
        DaggerHuobiRealmComponents.builder()
            .appComponent(appComponent)
            .build()
            .inject(this)
    }
}